package com.lejin.item.controller;


import com.lejin.item.entity.CourseReply;
import com.lejin.item.service.impl.CourseReplyServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author luminghua
 * @since 2022-04-21
 */
@RestController
@RequestMapping("/item/course-reply")
public class CourseReplyController {

    @Autowired
    CourseReplyServiceImpl courseReplyService;
    @RequestMapping("findReplyByCid/{cid}")
    public List<CourseReply> findReplyByCid(@PathVariable Integer cid){

        List<CourseReply> replyAndUserByCid = courseReplyService.findReplyAndUserByCid(cid);

        return replyAndUserByCid;

    }

}
